﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;


namespace LPV_POS
{

    public partial class Form1 : DevExpress.XtraEditors.XtraForm
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
      //      thuvien.Chuoi_CSDL = "Data Source = 192.168.1.72; Initial Catalog=LPVSALLIST; User ID=sa; Password=sa";
            thuvien.Chuoi_CSDL =@"Data Source=RAD03\SQLEXPRESS;Initial Catalog=LPVSALLIST12;Integrated Security=True";
            string[] s = new string[]{"@flag","@choose"};
            object[] o = new object []{1,1};
            thuvien tv  = new thuvien();
            DataTable tb;
            tb = tv.SP_SelectDataTable ("SP_STUDY_TOOL",s,o);
            grid_test.DataSource = tb;
        
           // popupMenu1.
         //   popupMenu1.AddItem(new );
            //DXPopupMenu menu = new DXPopupMenu();
            //menu.Items.Add(new DXMenuItem("Item1"));
            //menu.Items.Add(new DXMenuItem("Item2"));

            dropDownButton1.DropDownControl = popupMenu1;
           

        }

        private void color_EditValueChanged(object sender, EventArgs e)
        {
            lbel_header.Text = "Ban da chon mau";
            
            byte a = ((System.Drawing.Color)(color_mau.EditValue)).A;
            byte g = ((System.Drawing.Color)(color_mau.EditValue)).G;
            byte r = ((System.Drawing.Color)(color_mau.EditValue)).R;
            byte b = ((System.Drawing.Color)(color_mau.EditValue)).B;
            lbel_header.ForeColor = System.Drawing.Color.FromArgb(a, r, g, b);
          
        }

        private void lbel_header_Click(object sender, EventArgs e)
        {

        }
       
     

    }
}
